package com.wasion.gydpe.ice;

import nl.justobjects.pushlet.test.PushletPingApplication;
import CommProxy.CBasicParameter;
import Ice.Current;

import com.wasion.gydpe.ice.proxy.commpublishinf.CommPublishMessage;
import com.wasion.gydpe.ice.proxy.publishsubscriber.CustomMessage;
import com.wasion.gydpe.ice.proxy.publishsubscriber._MessagePublishSubscriberDisp;

public class publishI extends _MessagePublishSubscriberDisp {

	public void report(CustomMessage msg, Current __current) {
		String pushlet_port = "";
		String pushlet_ip = "";
		int port = 8080;
		CommPublishMessage cp = (CommPublishMessage) msg;
		CBasicParameter cb = cp.frame;
		TestProperties ec = TestProperties.getInstance();
		if (ec != null) {
			pushlet_port = ec.getPropertyValue("/IceComm.properties",
					"Pushlet.Port");
			pushlet_ip = ec.getPropertyValue("/IceComm.properties",
					"Pushlet.Ip");
			if (!pushlet_port.equals("")) {
				port = Integer.parseInt(pushlet_port);
			}

		}

		new PushletPingApplication(pushlet_ip, port, cb).start();
	}

}
